a=float(input("工资"));
b=0
x=(8000-3500)*0.05;
y=(15000-8000)*0.1;
if a<=3500:
    print("不要纳税");
elif a>3500 and a<=8000:
    b=(a-3500)*0.05
    print(b);
elif a>8000 and a<=15000:
    b=(a-8000)*0.1
    b=b+x
    print(b);
elif a>15000:
    b=(a-15000)*0.15
    b=b+x+y
    print(b);
